import 'package:flutter/material.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter_ume/routers/application.dart';
import 'package:flutter_ume/routers/routes.dart';
import 'package:flutter_ume/ui/home_pages/tab_navigator.dart';
import 'package:flutter_ume/common/component_index.dart';

void main() async {
  await SpUtil.getInstance();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  MyApp() {
    final router = new Router();

    Routes.configureRoutes(router);

    Application.router = router;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: TabNavigator(),
      onGenerateRoute: Application.router.generator,
    );
  }
}
